function snapshot_take (
	[int] $scenario,  #scenario 0..#s-1
	[int] $computer #ordinateur 0..#c-1
) { 
	$VMServer = $CONFIG_SERVERS[$computer]
	$sujet = $sujets[$scenario]
	
	# recherche des vms
	if(($vms_wmi = (get-vmwmi $vmServer $sujet))) {
		foreach($vm_wmi in $vms_wmi) {
			write-host (" take a NEW snapshot on "+($vm_wmi.Path.Server)+"\"+($vm_wmi.ElementName)) -foregroundcolor yellow
			New-VMSnapshot -VM $vm_wmi -force -wait
		}
	}
}

$actions.Insert($actions.Count,"snapshot_take");
set-variable LANG_ACTION__SNAPSHOT_TAKE "PRENDRE un snapshot" -scope global
